from selenium import webdriver
from time import sleep

driver = webdriver.Chrome()
driver.maximize_window()
driver.implicitly_wait(10)
driver.get("http://127.0.0.1")
driver.find_element("link text", "登录").click()
driver.find_element("id", "username").send_keys("15021241001")
driver.find_element("id", "password").send_keys("123456")
driver.find_element("id", "verify_code").send_keys("8888")
driver.find_element("class name", "login_bnt").click()
msg = driver.find_element("class name", "layui-layer-content").text
# assert msg == "账户名不存在或密码不匹配，请重新输入！"
assert msg == "账号不存在!"

sleep(2)
driver.quit()
